package com.shxzz.easy12306.services.pay.controller;

import com.shxzz.easy12306.framework.starter.convention.result.Result;
import com.shxzz.easy12306.framework.starter.convention.result.Results;
import com.shxzz.easy12306.framework.starter.common.dto.pay.RefundReqDTO;
import com.shxzz.easy12306.services.pay.service.PayService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 退款控制层
 * @author shxzz
 * @create 2024-03-17-21:44
 */
@RequiredArgsConstructor
@RestController
public class RefundController {

    private final PayService payService;

    /**
     * 公共退款接口
     */
    @PostMapping("/api/pay-service/common/refund")
    public Result<Void> commonRefund(@RequestBody RefundReqDTO requestParam) {
        return Results.success(payService.commonRefund(requestParam));
    }
}
